package com.eric.pageobject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;


public class LoginPage extends Page {

	
	public LoginPage(WebDriver driver){
		super(driver);
	}
	
	public void open(){
		openUrl("http://demo.bananascrum.com/session/new");
	}
	
	public MainPage login(String login, String passwd) {
		insertText(By.xpath("//*[@id=\"login\"]"), login);
		insertText(By.xpath("//*[@id=\"password\"]"), passwd);
		click(By.name("commit"));
		return new MainPage(driver);
	}
	
}
